package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.BmWarehouse;
import com.ruoyi.system.api.factory.RemoteWarehouseFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(contextId = "remoteWarehouseService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteWarehouseFallbackFactory.class)
public interface RemoteWarehouseService {

    @GetMapping(value = "/warehouse/getInfoByCode/{warehouseCode}")
    public AjaxResult getInfo(@PathVariable("warehouseCode") String warehouseCode);

    @GetMapping("/warehouse/getWarehouseList")
    public List<BmWarehouse> getWarehouseList();

}
